<?php
	global $_W,$_GPC;
	if($_W['role']&&$_W['isajax']){
		$id = $_GPC['oid'];
		$data = array(
			'title'=>$_GPC['title'],
			'imgurl'=>$_GPC['img'],
			'ishide'=>$_GPC['ishide'],
			'orderid'=>$_GPC['orderid'],
			'link'=>$_GPC['link'],
			'term'=>strtotime($_GPC['term']),
			'addtime'=>$_W['timestamp'],
			'linkgoodsid'=>$_GPC['linkgoodsid'],
		);
		$up = pdo_update('mii_ang_ad',$data,array('id'=>$id));
		if($up){
			$code = json_encode(array('status'=>'1','msg'=>'保存成功'));
			exit($code);
		}else{
			$code = json_encode(array('status'=>'2','msg'=>'保存失败'));
			exit($code);
		}
	}else{
		$code = json_encode(array('status'=>'2','msg'=>'没有操作权限'));
		exit($code);
	}
	

?>